package com.dc.system.service;

import com.dc.common.model.BaseModel;
import com.dc.system.model.ApprovalHistory;
import com.dc.system.model.ApprovalModel;
import com.dc.system.model.ApprovalProcess;
import com.dc.system.model.ApprovalProviso;

import javax.servlet.http.HttpServletRequest;

/**
 * @Description: ApprovalService 测试流程的运行
 * @Author: ChenXueLi
 * @Date: 2018-05-04 11:53
 */
public interface ApprovalService {

    /**
     * 添加一个模板
     * @param baseModel
     * @param approvalModel
     * @return
     */
    BaseModel addApprovalModel(BaseModel baseModel, ApprovalModel approvalModel, HttpServletRequest request) throws Exception;

    /**
     * 添加一个分条件
     * @param baseModel
     * @param approvalProviso
     * @return
     */
    BaseModel addApprovalProviso(BaseModel baseModel, ApprovalProviso approvalProviso, HttpServletRequest request) throws Exception;

    /**
     * 添加一个流程
     * @param baseModel
     * @param approvalProcess
     * @return
     */
    BaseModel addApprovalProcess(BaseModel baseModel, ApprovalProcess approvalProcess, HttpServletRequest request) throws Exception;

    /**
     * 审批操作
     * @param approvalHistory
     * @param baseModel
     * @param request
     * @return
     * @throws Exception
     */
    BaseModel examine(ApprovalHistory approvalHistory, BaseModel baseModel, HttpServletRequest request) throws Exception;


}
